#include <X11/Xlib.h>

Display *dpy = NULL;

int xinterface_init() {
  
  dpy = XOpenDisplay(NULL);
  return dpy == NULL ? 0 : 1;
}

void xinterface_setstatus(char *str) {
  Display *dpy = NULL;
  dpy = XOpenDisplay(NULL);
  XStoreName(dpy, DefaultRootWindow(dpy), str);
  XSync(dpy, False);
  XCloseDisplay(dpy);
}

void xinterface_close() {
  XCloseDisplay(dpy);
}

  
